import type { DataTableColumns } from 'naive-ui'

const codeStore = useCodeStore()

export const basicColumns: DataTableColumns<BaseRolePO> = [
  IdColumn,
  {
    key: 'name',
    title: '名称',
    width: 120
  },
  {
    key: 'ordIdx',
    title: '排序',
    width: 50
  },
  {
    key: 'status',
    title: '状态',
    render(row) {
      const type = row.status == _Status.Enabled ? _NTagType.Success : _NTagType.Error
      return renderTag(codeStore.getName(_Dict.Status, row.status), type)
    }
  },
  ...BaseColumns
]
